interface MessageListProps {
  messageList: any[];
  current: number;
  onClickItem: (index: number) => void;
}

Component<any>({
  mixins: [],
  data() {  },
  props: {
    messageList: {
      type: Array,
      value: [],
    },
    current: {
      type: Number,
      default: 0,
    },
    onClickItem: {
      type: Function,
      default: () => {},
    },
  },
  didMount() {
    console.log(this.props.messageList);
    
  },
  didUpdate() {},
  didUnmount() {},
  methods: {
    handleClick(e) {
      const { index } = e.currentTarget.dataset;
      if (typeof this.props.onClickItem === "function") {
        this.props?.onClickItem?.(index);
      }
    },
  },
});
